<include file="public/layout" />
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div class="page">
  <!-- 操作说明 -->
  <div id="explanation" class="explanation listexplan">
    <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
      <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
      <span title="收起提示" id="explanationZoom" style="display: block;"></span>
    </div>
    <ul>
      <li>站内信</li>
    </ul>
  </div>
  <div class="flexigrid">
    <div class="mDiv">
      <div class="ftitle">
        <h3>站内信</h3>
        <h5>(共{$totalRows}条记录)</h5>
      </div>
        <a href=""><div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div></a>
	 <form action="__URL__/index" id="search-form2" class="navbar-form form-inline" method="post" >
      <div class="sDiv">
        <div class="sDiv2"> 

          <input type="text" size="30" name="like_content" class="qsbox" placeholder="名称...">
            <!--排序规则-->             
          <input type="submit" class="btn" value="搜索"  id="button-filter" />
        </div>
      </div>
     </form>
    </div>
    <div class="tDiv">
      <div class="tDiv2">
        <div class="fbutton">
          <a href="{:U('Users/sendMessage')}">
            <div class="add" title="">
              <span><i class="fa"></i>发送站内信</span>
            </div>
          </a>
        </div>
      </div>
      <div style="clear:both"></div>
    </div>
    <div class="hDiv">
      <div class="hDivBox">
        <table cellspacing="0" cellpadding="0"  onclick="checkAllSign(this)">
          <thead>
            <tr>
              <th class="sign" axis="col6">
                <div style="width: 24px;"><i class="ico-check"></i></div>
              </th>         
              <th align="left" abbr="article_title" axis="col10" class="">
                <div style="text-align: left; width: 100px;" class="">id</div>
              </th>
              <th align="left" abbr="article_title" axis="col10" class="">
                <div style="text-align: left; width: 100px;" class="">发信人</div>
              </th>
              <th align="left" abbr="ac_id" axis="col4" class="">
                <div style="text-align: left; width: 100px;" class="">收信人</div>
              </th>
              <th align="center" abbr="article_show" axis="col10" style="width: 40%;" class="">
                <div style="text-align: center; width: 100px;" class="">内容</div>
              </th>
              <th align="center" abbr="article_show" axis="col10" class="">
                <div style="text-align: center; width: 100px;" class="">发送时间</div>
              </th>
              <th align="center" abbr="article_show" axis="col10" class="">
                <div style="text-align: center; width: 100px;" class="">状态</div>
              </th>
              <th align="center" abbr="article_time" axis="col10" class="">
                <div style="text-align: center; width: 150px;" class="">未读消息</div>
              </th>
              <th align="center" abbr="article_show" axis="col10" class="">
                <div style="text-align: center; width: 150px;" class="">操作</div>
              </th>
              <!--<th align="center" abbr="article_time" axis="col6" class="">-->
                <!--<div style="text-align: center; width: 100px;" class="">GET</div>-->
              <!--</th>-->
              <!--<th align="center" abbr="article_time" axis="col6" class="">-->
                <!--<div style="text-align: center; width: 100px;" class="">POST</div>-->
              <!--</th>-->


            </tr>
          </thead>
        </table>
      </div>
    </div>    
    
    <div class="bDiv" style="height: auto;">
     <!--ajax 返回 --> 
      <div id="flexigrid" cellpadding="0" cellspacing="0" border="0" data-url="{:U('del')}">
        <table>
          <tbody>
          <volist name="lists" id="list">
            <tr data-id="{$list.id}">
              <td class="sign" axis="col6" >
                <div style="width: 24px;"><i class="ico-check"></i></div>
              </td>
              <td align="center" axis="col10">
                <div style="width: 100px;">{$list.id}</div>
              </td>
              <td align="center" axis="col10">
                <div style="text-align: left; width: 100px;">{$list.username}</div>
              </td>
              <td align="center" axis="col10">
                <div style="text-align: center; width: 100px;">{$list.admin}</div>
              </td>

              <td align="center" axis="col10" style="width: 40%;">
                <div style="text-align: center; width: 100px;">{$list.msg}</div>
              </td>
              <td align="center" axis="col10">
                <div style="text-align: center; width: 100px;">{$list.w_time}</div>
              </td>
              <td align="center" axis="col10">
                <div style="text-align: center; width: 100px; ">{$list.status_text}</div>
              </td>
              <td align="center" axis="col10">
                <div style="text-align: center; width: 150px; ">{$list.read_num}</div>
              </td>
              <!--<td align="center" axis="col0">-->
                <!--<div style="text-align: left; width: 100px;">{$list.get_data}</div>-->
              <!--</td>-->
              <!--<td align="center" axis="col0">-->
                <!--<div style="text-align: left; width: 100px;">{$list.post_data}</div>-->
              <!--</td>-->
              <td align="" class="" style=" width: 150px;">
                <div style="text-align: center; width: 150px; max-width:170px;">
                  <a href="{:U('huifu',array('id'=>$list['id']))}" class="btn blue"><i class="fa fa-pencil-square-o"></i>回复</a>
                  <a class="btn red"  href="javascript:void(0)" data-url="{:U('del')}" data-id="{$list.id}" onClick="delfun(this)"><i class="fa fa-trash-o"></i>删除</a>
                </div>
              </td>

            </tr>
          </volist>
          </tbody>
        </table>
      </div>
    </div>
     </div>
  <!--分页位置--> {$page}
</div>
<script type="text/javascript" src="__PUBLIC__/static/js/adminlist.js"></script>
<script>
    function delfun(obj) {
        // 删除按钮
        layer.confirm('确认删除？', {
            btn: ['确定', '取消'] //按钮
        }, function () {
            $.ajax({
                type: 'post',
                url: $(obj).attr('data-url'),
                data : {act:'del',id:$(obj).attr('data-id')},
                dataType: 'json',
                success: function (data) {
                    layer.closeAll();
                    if (data.status == 1) {
                        $(obj).parent().parent().parent().remove();
                        layer.closeAll();
                    } else {
                        layer.alert('删除失败', {icon: 2});  //alert('删除失败');
                    }
                }
            })
        }, function () {
        });
    }
</script>
</body>
</html>